﻿<!DOCTYPE html>
<html>
<head>
<title>修改密码</title>
<meta charset="utf-8">
<link rel="stylesheet" href="styles/login.css"/>
<script type="text/javascript" src="scripts/BaseValues.js">
</script>
<script type="text/javascript" src="scripts/jquery.min.js">
</script>
<script type="text/javascript" src="scripts/login/login.js">
</script>
<script type="text/javascript" src="scripts/login/login_callback.js">
</script>
<script type="text/javascript" src="scripts/cookie_util.js">
</script>
<script type="text/javascript" src="scripts/base64.js">
</script>
</head>
	<body>
		<div class="global">
			<div class="sig sig_in" tabindex='4' id='zc'>
				<dl>
					<dt>
						<div class='header'>
							<h3>修改密码</h3>
						</div>
					</dt>
					<dt></dt>
					<dt>
						<div class='letter'>
							原密码:&nbsp;<input type="text" name="" id="last_password" tabindex='1'/>
							<div class='warning' id='warning_1'><span>原始密码错误</span></div>
						</div>
					</dt>
					<dt>
						<div class='letter'>
							新密码:&nbsp;<input type="password" name="" id="new_password" tabindex='2'/>
							<div class='warning' id='warning_2'><span>新密码长度过短</span></div>
						</div>
					</dt>
					<dt>
						<div class='password'>
							确认新密码:&nbsp;<input type="password" name="" id="final_password" tabindex='3'/>
							<div class='warning' id='warning_3'><span>密码输入不一致</span></div>
						</div>
					</dt>
					<dt>
						<div>
							<input type="button" name="" id="changePassword" value='&nbsp;确&nbsp;定&nbsp;' tabindex='4'/>
							<input type="button" name="" id="back" value='&nbsp;关&nbsp;闭&nbsp;' tabindex='5'/>
							<script type="text/javascript">
							var flog = true;
							function get(e){
								return document.getElementById(e);
							}
							get('back').onclick=function(){
								get('zc').className='sig sig_out';
								//window.history.back();
								window.opener=null;
								window.open('','_self');
								window.close();
							}
							window.onload=function(){
								get('last_password').onblur=function(){
									var lpassword=get('last_password').value;
									if(!validOldPwd(lpassword)){
										get('warning_1').style.display='block';
										flog = false;
									}else{
										get('warning_1').style.display='none';
										flog = true;
									}
								}
								
								get('final_password').onblur=function(){
									
									var npassword=get('new_password').value;
									var fpassword=get('final_password').value;
									if(npassword!=fpassword){
										get('warning_3').style.display='block';
										flog = false;
									}else{
										flog = true;
									}
								}
								get('new_password').onblur=function(){
									var npassword=get('new_password').value.length;
									if(npassword<6&&npassword>0){
										get('warning_2').style.display='block';
										flog = false;
									}else{
										flog = true;
									}
								}
								get('new_password').onfocus=function(){
									get('warning_2').style.display='none';
								}
								get('final_password').onfocus=function(){
									get('warning_3').style.display='none';
								}
								$("#changePassword").click(function(){
									if(flog){
										changepwd(changepwdSuccess,changepwdError);
									}
									
								})
								
							}
							</script>
						</div>
					</dt>
				</dl>
			</div>
		</div>
	</body>
</html>